cod_damage_pre

Syntax

forward cod_damage_pre(attacker, victim, weapon, Float:damage, damageBits, hitPlace);

Usage

attacker
Attacker index
victim
Victim index
weapon
Weapon used to make this damage
damage
Amount of damage to deal
damageBits
Damage flags in DMG_* format
hitPlace
Body hit place in HIT_* format

Description

Multiforward called before player receives damage.

Note

It is called before armor damage reduction.

Note

Damage forwards are called in this order:
cod_class_damage_victim
cod_item_damage_victim
cod_class_damage_attacker
cod_item_damage_attacker
cod_damage_pre
cod_damage_post

Return

Set to COD_BLOCK (-1.0) to block damage